Optimal. Leaf size=45 \[ \frac{a^2 x^2}{2}-\frac{a b \tanh ^{-1}\left (\cos \left (c+d x^2\right )\right )}{d}-\frac{b^2 \cot \left (c+d x^2\right )}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0508865, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.312, Rules used = {4205, 3773, 3770, 3767, 8} \[ \frac{a^2 x^2}{2}-\frac{a b \tanh ^{-1}\left (\cos \left (c+d x^2\right )\right )}{d}-\frac{b^2 \cot \left (c+d x^2\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4205
Rule 3773
Rule 3770
Rule 3767
Rule 8
Rubi steps
\begin{align*} \int x \left (a+b \csc \left (c+d x^2\right )\right )^2 \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int (a+b \csc (c+d x))^2 \, dx,x,x^2\right )\\ &=\frac{a^2 x^2}{2}+(a b) \operatorname{Subst}\left (\int \csc (c+d x) \, dx,x,x^2\right )+\frac{1}{2} b^2 \operatorname{Subst}\left (\int \csc ^2(c+d x) \, dx,x,x^2\right )\\ &=\frac{a^2 x^2}{2}-\frac{a b \tanh ^{-1}\left (\cos \left (c+d x^2\right )\right )}{d}-\frac{b^2 \operatorname{Subst}\left (\int 1 \, dx,x,\cot \left (c+d x^2\right )\right )}{2 d}\\ &=\frac{a^2 x^2}{2}-\frac{a b \tanh ^{-1}\left (\cos \left (c+d x^2\right )\right )}{d}-\frac{b^2 \cot \left (c+d x^2\right )}{2 d}\\ \end{align*}
Mathematica [A] time = 0.396546, size = 86, normalized size = 1.91 \[ \frac{2 a \left (a c+a d x^2+2 b \log \left (\sin \left (\frac{1}{2} \left (c+d x^2\right )\right )\right )-2 b \log \left (\cos \left (\frac{1}{2} \left (c+d x^2\right )\right )\right )\right )+b^2 \tan \left (\frac{1}{2} \left (c+d x^2\right )\right )+b^2 \left (-\cot \left (\frac{1}{2} \left (c+d x^2\right )\right )\right )}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.03, size = 61, normalized size = 1.4 \begin{align*}{\frac{{a}^{2}{x}^{2}}{2}}-{\frac{{b}^{2}\cot \left ( d{x}^{2}+c \right ) }{2\,d}}+{\frac{ab\ln \left ( \csc \left ( d{x}^{2}+c \right ) -\cot \left ( d{x}^{2}+c \right ) \right ) }{d}}+{\frac{{a}^{2}c}{2\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 0.95805, size = 132, normalized size = 2.93 \begin{align*} \frac{1}{2} \, a^{2} x^{2} - \frac{a b \log \left (\cot \left (d x^{2} + c\right ) + \csc \left (d x^{2} + c\right )\right )}{d} - \frac{b^{2} \sin \left (2 \, d x^{2} + 2 \, c\right )}{d \cos \left (2 \, d x^{2} + 2 \, c\right )^{2} + d \sin \left (2 \, d x^{2} + 2 \, c\right )^{2} - 2 \, d \cos \left (2 \, d x^{2} + 2 \, c\right ) + d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 0.504679, size = 236, normalized size = 5.24 \begin{align*} \frac{a^{2} d x^{2} \sin \left (d x^{2} + c\right ) - a b \log \left (\frac{1}{2} \, \cos \left (d x^{2} + c\right ) + \frac{1}{2}\right ) \sin \left (d x^{2} + c\right ) + a b \log \left (-\frac{1}{2} \, \cos \left (d x^{2} + c\right ) + \frac{1}{2}\right ) \sin \left (d x^{2} + c\right ) - b^{2} \cos \left (d x^{2} + c\right )}{2 \, d \sin \left (d x^{2} + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int x \left (a + b \csc{\left (c + d x^{2} \right )}\right )^{2}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.18247, size = 113, normalized size = 2.51 \begin{align*} \frac{2 \,{\left (d x^{2} + c\right )} a^{2} + 4 \, a b \log \left ({\left | \tan \left (\frac{1}{2} \, d x^{2} + \frac{1}{2} \, c\right ) \right |}\right ) + b^{2} \tan \left (\frac{1}{2} \, d x^{2} + \frac{1}{2} \, c\right ) - \frac{4 \, a b \tan \left (\frac{1}{2} \, d x^{2} + \frac{1}{2} \, c\right ) + b^{2}}{\tan \left (\frac{1}{2} \, d x^{2} + \frac{1}{2} \, c\right )}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]